import java.util.Scanner;

public class program11 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("Enter the number of years: ");
        int years = in.nextInt();
        long pop = 312032486L;
        long secPerYear = 365L * 24 * 60 * 60;
        long birth = secPerYear / 7;
        long death = secPerYear / 13;
        long immigrant = secPerYear / 45;
        pop += (birth - death + immigrant) * years;
        System.out.println("The population in " + years + " years is " + pop);
    }
}
